﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="menu.aspx.cs" Inherits="GEELY.frame.menu" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../js_css/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <link href="../js_css/bootstrap/css/bootstrap-theme.css" rel="stylesheet" />
    <link href="../js_css/bootstrap/css/bootstrap-treeview.min.css" rel="stylesheet" />
    <script src="../js_css/js/jquery-1.12.3.js"></script>
    <script src="../js_css/bootstrap/js/bootstrap.js"></script>
    <script src="../js_css/bootstrap/js/bootstrap-treeview.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div id="tree">
        </div>
    </form>
    <script>
        function getTree() {
            var tree = [
                {
                    text: "ANDON 报表查询",
                    selectable: false,//设置为false将使节点展开，并且不能被选择。
                    nodes: [
                        {
                            text: "线体故障累计时间",
                            href: "ANDON_LineStoppingtime.aspx",
                        },
                        {
                            text: "工位停线和报警",
                            href: "ANDON_StopLineAlarm.aspx",
                        },
                        {
                            text: "工位停线频次与时间",
                            href: "ANDON_StopLineRateTime.aspx",
                        },
                        {
                            text: "工位拧紧频次与时间",
                            href: "ANDON_TightenRateTime.aspx",
                        }
                    ]
                },
                {
                    text: "AVI 报表查询",
                    selectable: false,//设置为false将使节点展开，并且不能被选择。
                    nodes: [
                        {
                            text: "AVI 总装车辆信息",
                            href: "AVI_CrossPointInformation.aspx",
                        }
                    ]

                },
            ];
            return tree;
        }
        $('#tree').treeview({
            data: getTree(),
            collapseIcon: "glyphicon glyphicon-menu-down",
            expandIcon: "glyphicon glyphicon-menu-right",
        });

        $('#tree').on('nodeSelected', function (event, data) {
            console.log(event);
            console.log(data);
            var targetSrc = "";
            targetSrc = data.href;
            console.log(targetSrc);
            parent.document.getElementById("frameMain").src = targetSrc;
        })
    </script>
</body>
</html>